/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - For5
 * <p>Powered by webrx On 2023-06-12 17:26:55
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For7 {
    public static void main(String[] args) {
        //输入1 - 5
        //for (int i = 1; i <= 100; i++) {
        //    int s = 0;
        //    s+=i;
        //    System.out.println(s);
        //}
        //System.out.println(s);

        //for (int i = 10; i > 5; i--) {
        //    System.out.println(i);
        //}

        //计算1+2+3+...+100 = ?
        int sum = 0;
        for(int i=1;i<=100;i++) sum+=i;
        System.out.printf("1+2+3+...+100=%d%n",sum);
    }
}
